'''
Author: zhao-leo 18055219130@163.com
Date: 2024-10-22 22:25:10
LastEditTime: 2024-10-22 22:59:29
'''
class BasicModel():
  def __init__(self, model_path: str):
    self.model_path = model_path
  
  def main_logic(self,*args,**kwargs):
    pass
  
  def run_model(self,*args, **kwargs):
      '''
      run your model
      all the parameters will be passed to main_logic
      show_result: bool, default False, whether to print the result
      '''
      show_result = kwargs.get("show_result", True)
      try:
        del kwargs["show_result"]
      except:
        pass
      print("Start running your model\n")
      result = self.main_logic( *args, **kwargs)
      if show_result:
          print(result)
      return result